﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Auditing;
using Volo.Abp.Identity;
using Volo.Abp.Validation;

namespace LINGYUN.Abp.Account;

public class PhoneRegisterDto
{
    [Required]
    [Phone]
    [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPhoneNumberLength))]
    [Display(Name = "PhoneNumber")]
    public string PhoneNumber { get; set; }

    [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxNameLength))]
    [DisplayName("Name")]
    public string Name { get; set; }

    [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxUserNameLength))]
    [DisplayName("UserName")]
    public string UserName { get; set; }

    [EmailAddress]
    [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxEmailLength))]
    [DisplayName("EmailAddress")]
    public string EmailAddress { get; set; }

    [Required]
    [DynamicStringLength(typeof(IdentityUserConsts), nameof(IdentityUserConsts.MaxPasswordLength))]
    [DataType(DataType.Password)]
    [DisplayName("Password")]
    [DisableAuditing]
    public string Password { get; set; }

    [Required]
    [StringLength(6,MinimumLength = 6)]
    [DisableAuditing]
    [DisplayName("DisplayName:SmsVerifyCode")]
    public string Code { get; set; }
}
